import Vue from 'vue'
import App from './App.vue'
import router from './router/index.js'
import store from './store'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import { netGetRsaPublicKey } from './api'

Vue.use(ElementUI)

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app')

// 获取公钥
netGetRsaPublicKey().then(async (res) => {
  if (!res.success) {
    throw new Error(`获取服务器公钥失败,消息:${res.message}`)
  }
  // HttpClientUtils.refreshRsaPublicKey(res.data)
  console.log('rsaKey==>',res.data);
})
